Optimal. Leaf size=160 \[ \frac {\, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac {\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3756, 1907,
252, 251, 372, 371} \begin {gather*} \frac {\tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {3}{n},-p;\frac {n+3}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac {\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 251
Rule 252
Rule 371
Rule 372
Rule 1907
Rule 3756
Rubi steps
\begin {align*} \int \sec ^4(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx &=\frac {\text {Subst}\left (\int \left (c^2+x^2\right ) \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\text {Subst}\left (\int \left (c^2 \left (a+b x^n\right )^p+x^2 \left (a+b x^n\right )^p\right ) \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\text {Subst}\left (\int x^2 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\text {Subst}\left (\int \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \text {Subst}\left (\int x^2 \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \text {Subst}\left (\int \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac {\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.42, size = 122, normalized size = 0.76 \begin {gather*} \frac {\tan (e+f x) \left (3 \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )+\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^2(e+f x)\right ) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.35, size = 0, normalized size = 0.00 \[\int \left (\sec ^{4}\left (f x +e \right )\right ) \left (a +b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p}{{\cos \left (e+f\,x\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________